package com.culturalCenter.dataCenter.Utils;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 响应枚举状态码
 * @Author wu
 * @Date 2020/06/12
 **/
@Getter
@AllArgsConstructor
public enum ResultCode {

    SUCCESS("0000", "成功"),
    FALL("9999", "失败"),
    // 缺少token或者会话信息
    UNAUTHORIZED("9001", "未认证（签名错误）"),
    NO_RECORD("9002", "查询无记录"),
    // 缺少必须地请求参数
    REQUEST_PARAM_ERROR("9003", "请求参数错误"),
    NOT_FOUND("404", "接口不存在"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误"),
    ACCESS_DENIED("4301", "权限不足"),
    LOGIN_NAME_ERROR("4302", "用户名不存在"),
    LOGIN_PASSWORD_ERROR("4304", "密码错误"),
    AUTH_HEADER_ERROR("4305", "不合法的token验证"),
    TOKEN_NEEDED("4306", "无token信息，访问当前资源请先登录"),
    TOKEN_EXPIRED("4307", "token已过期，请重新登录"),
    TOKEN_REFRESHED("4308", "token已被刷新，用户在其他地方登录"),
    ALREADY_LOGIN("4309", "用户已在其他设备登录"),
    SSO_AUTHENTICATE_FAILED("4310", "当前用户未通过sso服务验证"),
    HEAD_NEEDED("4312", "认证失败，无法访问系统资源");

    private final String code;
    private final String message;

}
